#include "stm32f10x.h"                  // Device header
#include <stdio.h>
#include "math.h"

extern int integerPart;
extern int decimalPart;
double add(double a, double b)
{
	return a + b;
}

double sub(double a, double b)
{
	return a - b;
}

double mul(double a, double b)
{
	return a * b;
}

double div(double a, double b)
{
	double result;
	
	result = a / b;
	
	result = result * 100;
	result = round(result);//返回值为四舍五入后的整数，但返回类型仍然是double
	result = result / 100;
	

	
	return result;

}

void clear_input_buffer()
{
	while (getchar() != '\n');
}
